package com.mate.cloud.exception;

import com.mate.cloud.common.constant.ResponseEnum;

/**
 *
 * @author:         MI
 * @email:          448341911@qq.com
 * @createTime:     2025/2/8 17:06
 * @updateUser:     MI
 * @updateTime:     2025/2/8 17:06
 * @updateRemark:   修改内容
 * @version:        v1.0
 */
public class BusinessException extends BaseException {
    public BusinessException(Integer code) {
        super(code);
    }

    public BusinessException(Integer code, String message) {
        super(code, message);
    }
    /**
     * 使用错误码枚举创建异常
     */
    public BusinessException(final ResponseEnum errorMessage) {
        this(errorMessage.getCode(), errorMessage.getLocalMessage());
    }
}
